import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { NZ_I18N } from 'ng-zorro-antd/i18n';
import { zh_CN } from 'ng-zorro-antd/i18n';
import {CommonModule, registerLocaleData} from '@angular/common';
import zh from '@angular/common/locales/zh';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
registerLocaleData(zh);
import {HeroInterceptor} from "./service/http/hero.interceptor";
import {WelcomeComponent} from "./component/welcome/welcome.component";
import {DictComponent} from "./component/dict/dict.component";
import {UserComponent} from "./component/user/user.component";
import {NzTableModule} from "ng-zorro-antd/table";
import {NzInputModule} from "ng-zorro-antd/input";
import {NzProgressModule} from "ng-zorro-antd/progress";
import {NzPopconfirmModule} from "ng-zorro-antd/popconfirm";
import {NzAvatarModule} from "ng-zorro-antd/avatar";
import {NzSwitchModule} from "ng-zorro-antd/switch";
import {NzModalModule} from "ng-zorro-antd/modal";
import {NzIconModule} from "ng-zorro-antd/icon";
import {NzDrawerModule} from "ng-zorro-antd/drawer";
import {NzButtonModule} from "ng-zorro-antd/button";
import {NzSpinModule} from "ng-zorro-antd/spin";
import {NzImageModule} from "ng-zorro-antd/image";
import {NzMenuModule} from "ng-zorro-antd/menu";
import {NzToolTipModule} from "ng-zorro-antd/tooltip";
import {NzEmptyModule} from "ng-zorro-antd/empty";
import {NzGridModule} from "ng-zorro-antd/grid";
import {NzDividerModule} from "ng-zorro-antd/divider";
import {NzBadgeModule} from "ng-zorro-antd/badge";
import {NzPopoverModule} from "ng-zorro-antd/popover";
import {NzLayoutModule} from "ng-zorro-antd/layout";
import {NzPaginationModule} from "ng-zorro-antd/pagination";
import {NzFormModule} from "ng-zorro-antd/form";
import {NzUploadModule} from "ng-zorro-antd/upload";
import {NzRadioModule} from "ng-zorro-antd/radio";
import {ShopComponent} from "./component/shop/shop.component";
import {NzSelectModule} from "ng-zorro-antd/select";
import {NzTagModule} from "ng-zorro-antd/tag";
import {NzDescriptionsModule} from "ng-zorro-antd/descriptions";
import {NzDatePickerModule} from "ng-zorro-antd/date-picker";
import {HomeComponent} from "./component/home/home.component";
import {NzStatisticModule} from "ng-zorro-antd/statistic";
import {HttpService} from "./service/http/http.service";

@NgModule({
  declarations: [
    AppComponent,
    WelcomeComponent,
    DictComponent,
    UserComponent,
    ShopComponent,
    HomeComponent,

  ],
    imports: [
        BrowserModule,
        CommonModule,
        FormsModule,
        ReactiveFormsModule,
        BrowserAnimationsModule,
        AppRoutingModule,
        HttpClientModule,
        NzInputModule,
        NzProgressModule,
        NzPopconfirmModule,
        NzAvatarModule,
        NzSwitchModule,
        NzModalModule,
        NzIconModule,
        NzDrawerModule,
        NzButtonModule,
        NzSpinModule,
        NzImageModule,
        NzMenuModule,
        NzToolTipModule,
        NzEmptyModule,
        NzTableModule,
        NzGridModule,
        NzDividerModule,
        NzBadgeModule,
        NzPopoverModule,
        NzLayoutModule,
        NzPaginationModule,
        NzFormModule,
        NzUploadModule,
        NzRadioModule,
        NzSelectModule,
        NzTagModule,
        NzDescriptionsModule,
        NzDatePickerModule,
        NzStatisticModule,
        NzImageModule
    ],
  providers: [
    { provide: NZ_I18N, useValue: zh_CN },
    { provide: HTTP_INTERCEPTORS, useClass: HeroInterceptor, multi: true },
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
